/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package xlsBeans;

import com.smartxls.WorkBook;

/**
 *
 * @author Lucas
 */
public class RecordLevelElementsXLS {
    private String type;
    private String ownercode;
    private String dataset;
    private String rights;
    private String rightsholder;
    private String accessrights;
    private String informationwithheld;
    private String datageneralization;
    private String dynamicproperties;

    private int sp;

    public RecordLevelElementsXLS() {
        this.type = "";
        this.ownercode = "";
        this.dataset = "";
        this.rights = "";
        this.rightsholder = "";
        this.accessrights = "";
        this.informationwithheld = "";
        this.datageneralization = "";
        this.dynamicproperties = "";
    }

    public RecordLevelElementsXLS(WorkBook w, int l, int sp) {
        try{
            setRecordLevelElements(w, l, sp);
        }catch(Exception e){
            e.printStackTrace();
        }
    }

    public void setRecordLevelElements(WorkBook w, int l, int sp) throws Exception {
        this.type = w.getText(l, 7 + sp);
        this.ownercode = w.getText(l, 8 + sp);
        this.dataset = w.getText(l, 9 + sp);
        this.rights = w.getText(l, 10 + sp);
        this.rightsholder = w.getText(l, 11 + sp);
        this.accessrights = w.getText(l, 12 + sp);
        this.informationwithheld = w.getText(l, 13 + sp);
        this.datageneralization = w.getText(l, 14 + sp);
        this.dynamicproperties = w.getText(l, 15 + sp);
    }

    public boolean isSetRecord(){
        if(this.type.equals("") && this.ownercode.equals("") && this.dataset.equals("") && this.rights.equals("") && this.rightsholder.equals("") && this.accessrights.equals("") && this.informationwithheld.equals("") && this.datageneralization.equals("") && this.dynamicproperties.equals(""))
            return  false;
        else return true;
    }

    public String getAccessrights() {
        return accessrights;
    }

    public void setAccessrights(String accessrights) {
        this.accessrights = accessrights;
    }

    public String getDatageneralization() {
        return datageneralization;
    }

    public void setDatageneralization(String datageneralization) {
        this.datageneralization = datageneralization;
    }

    public String getDataset() {
        return dataset;
    }

    public void setDataset(String dataset) {
        this.dataset = dataset;
    }

    public String getDynamicproperties() {
        return dynamicproperties;
    }

    public void setDynamicproperties(String dynamicproperties) {
        this.dynamicproperties = dynamicproperties;
    }

    public String getInformationwithheld() {
        return informationwithheld;
    }

    public void setInformationwithheld(String informationwithheld) {
        this.informationwithheld = informationwithheld;
    }

    public String getOwnercode() {
        return ownercode;
    }

    public void setOwnercode(String ownercode) {
        this.ownercode = ownercode;
    }

    public String getRights() {
        return rights;
    }

    public void setRights(String rights) {
        this.rights = rights;
    }

    public String getRightsholder() {
        return rightsholder;
    }

    public void setRightsholder(String rightsholder) {
        this.rightsholder = rightsholder;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }


}
